<%@include file="taglib_includes.jsp" %>
<html>
<head>
<title><spring:message code="Add.Semester.Title"></spring:message></title>
</head>
<body>
<table  bgcolor="white" width="750" height="500" align="center" style="border-collapse: collapse;" border="1" bordercolor="#006699" >
	<tr>
		<td align="center" style="background-color: lightblue"><h3>Map Semester</h3></td>
	</tr>
	
	<tr valign="middle" align="center">
	<td align="center" valign="middle">
 		<form:form action="addSemester" method="post" commandName="add_semester" modelAttribute="mapSemesterForm">
 			<table width="350" height="350" style="border-collapse: collapse;" border="0" bordercolor="#006699" cellspacing="2" cellpadding="2">
 				<thead style="background:#d3dce3">
		<tr>
			<th>Batch Name</th>
			<th>Department Name</th>
			<th>Semester Name</th>
			<th>Status</th>
		</tr>
	</thead>
	<tbody style="background:#ccc">
		<c:forEach var="mapSemDTO" items="${mapSemesterForm.mapSemDTO}" varStatus="status">
		<tr>
			<td><c:out value="mapSemDTO[${status.index}].batchName"></c:out></td>
			<td><c:out value="mapSemDTO[${status.index}].deptName"></c:out></td>
						<td>
						<form:select path="mapSemDTO[${status.index}].semester">
						
						<form:options itemValue="mapSemDTO[${status.index}].semester" />
						<c:if test="${mapsem.semester==null}">
						<form:option value="S1,S2" label="S1&S2"/>
						<form:option value="S3" label="S3"/>
						<form:option value="S4" label="S4"/>
						<form:option value="S5" label="S5"/>
						<form:option value="S6" label="S6"/>
						<form:option value="S7" label="S7"/>
						<form:option value="S8" label="S8"/></c:if>
						</form:select>
						</td>
						
						<td>
						<form:select path="mapSemDTO[${status.index}].status">
						<form:options itemValue="mapSemDTO[${status.index}]status" />
						<c:if test="${mapsem.status==null}">
						<form:option value="Yes" label="Active"/>
						<form:option value="No" label="Completed"/></c:if>
						</form:select>
						</td>
				</tr>
			
		
		</c:forEach>
	</tbody>
 				
 				
					<tr>
						<td colspan="3" align="center">
						<input type="submit" name="" value="Save">
						&nbsp;&nbsp;
						<input type="reset" name="" value="Reset">
						
						</td>
						
					</tr>	
						
 			</table>
 			<tr align="center">
						<td width="100" align="center"><B>
						${savedMsg}
						</B>
						</td>
						</tr>	
 		</form:form>
 		</td>
 		</tr>
</table>
</body>
</html>